{extend name="property/public/insidePageBase" /}
{block name="title"}批量分配任务{/block}
{block name="body"}
<div class="layuimini-container">
    <div class="layuimini-main">
        <div class="layui-form layui-form-pane">

            <div class="layui-form-item">
                <label class="layui-form-label">工单责任人</label>
                <div class="layui-input-block">
                    <select name="handle_user_id" lay-search>
                        <option value="">请选择责任人</option>
                        {foreach $userList as $v}
                        <option value="{$v['id']}">{$v['username']} - {$v['mobile']}</option>
                        {/foreach}
                    </select>
                </div>
            </div>
            <div class="layui-form-item layui-form-text">
                <label class="layui-form-label">备注说明</label>
                <div class="layui-input-block">
                    <textarea placeholder="请输入备注说明" class="layui-textarea" name="remark"></textarea>
                </div>
            </div>
            <table id="repairTable" lay-filter="repairTable"></table>
            <div class="layui-form-item layui-hide">
                <input type="hidden" name="id" value="{:request()->get('id')}" />
                <button class="layui-btn" lay-submit lay-filter="submitBtn" id="submitBtn">提交</button>
            </div>
        </div>
    </div>
</div>
{/block}
{block name="js"}
{__block__}
<script>
    var repairData = [];
    var rechargeRemark = '';
    layui.use(['form', 'laytpl','upload','table', 'laydate'], function () {
        var form = layui.form,laytpl = layui.laytpl,  table = layui.table,laydate = layui.laydate;
        $('#confirmBatchData').on('click', function() {
            let rechargeAmount = $('#batch_balance').val()
            let rechargeType = $('#recharge_type').val()
        });

        repairData = {:json_encode($repairData)};
        $('#meterNumBox').show()
        let tableObj = table.render({
            elem: '#repairTable' //指定原始表格元素选择器（推荐id选择器）
            ,id:'repairTable'
            ,data:repairData
            ,height: 400 //容器高度
            ,cols: [[
                {field: 'contact_name', width: 88, title: '联系人',sort: true},
                {field: 'contact_mobile', width: 118, title: '联系电话',sort: true},
                {field: 'hope_date', width: 98, title: '预约日期',sort: true},
                {field: 'hope_time', width: 98, title: '预约时间',sort: true},
                {field: 'content', minWidth: 120,title: '工单描述', sort: true},
            ]],
            limit: 1000,
            size:'sm'
        });
    });
</script>
{/block}